< Back
# Spring JPA references https://docs.jboss.org/hibernate/orm/6.0/userguide/html_single/Hibernate_User_Guide.html#associations start with spring init https://start.spring.io/ add dependencies - Spring Data JPA - H2 Database - Lombok add project configruration as per [this post](http://./spring/SpringData%20Configuration) without server.port of course. Then change `datasource` to ```yml url: jdbc:h2:mem:jpademo; ``` the `url` doesn't matter here. ## Source Code https://github.com/Charnnarong/springDataJPARef ## Tips To read Hibernate mapping , follow the arrows OneToMany, ManyToOne, ManyToMany, OneToMon can be all read as the following pattern. ![association](https://i.imgur.com/ZpQAYMI.png) For `mappedBy`, it refers to the other class' field. ![mapped by](https://i.imgur.com/0WjgNOe.png)